<template>
  <div>
    <div id="homePage">
      <div class="homePagehead">
        <div class="w">
          <div class="homePagehead1">
            <img src="./assets/hompageimg/login.png" class="homePagehead2" />
          </div>
          <div class="homePagehead3">
            <el-tabs v-model="activeName" @tab-click="handleClick" class="homePagehead4">
              <el-tab-pane v-for="(item, index) in routerList" :key="index" :label="item.name" :name="item.path">
                <!-- <components :is="item.path" v-if="item.path == nowPage"></components> -->
              </el-tab-pane>
            </el-tabs>
          </div>
        </div>
      </div>
      <!-- <thecore></thecore> -->
      <router-view></router-view>
      <!-- <Thecore></Thecore> -->
      <div class="thecore54">
        <div class="thecore55">Copyrighting@2016-2022 南京罗斯蒙德信息科技有限公司版权所有</div>
        <div class="thecore56">
          南京罗斯蒙德信息科技有限公司&nbsp;&nbsp;&nbsp;
          <a class="thecore56one" href="http://beian.miit.gov.cn" target="_blank">苏ICP备2020062353号</a>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import "./store/flexible";
import "./assets/styles/index.css";
// import Thecore from "./views/thecore/index.vue";
export default {
  // components: { Thecore },
  data() {
    return {
      activeName: localStorage.getItem("active") || "/index",
      routerList: [],
      niu: [],
      // nowPage: "thecore",
      // thecore: "",
    };
  },
  created() {
    // if (this.$route.path !== "/thecore") {
    //   this.$route.replace("thecore");
    //   console.log(2222);
    // }
  },
  mounted() {
    // 获取路由
    this.routerList = this.$router.options.routes;
    // this.updateType();
    // console.log(1);
  },
  methods: {
    // updateType() {
    //   for (let i = 0; i < this.routerList.length; i++) {
    //     this.niu = this.routerList[i].length;
    //   }
    //   if (this.niu == "0") {
    //     this.activeName = "/thecore";
    //   } else if (this.niu == "1") {
    //     this.activeName = "/corestrengths";
    //   } else if (this.niu == "2") {
    //     this.activeName = "/productsandservices";
    //   } else if (this.niu == "3") {
    //     this.activeName = "/thesolution";
    //   } else if (this.niu == "4") {
    //     this.activeName = "/aboutus";
    //   }
    //   console.log(this.niu, "35768934");
    //   //通过拿到的值不同，更改activeName的值
    // },
    handleClick(tab) {
      localStorage.setItem("active", tab.name);
      // localStorage.clear("active", tab.name);
      this.$router.push(tab.name);
    },
  },
};
</script>

<style scoped>
/* ::v-deep .el-tabs__nav {
  width: 15rem;
  border-bottom: 2px solid #eeeeee !important;
} */
::v-deep .el-tabs__nav-wrap::after {
  background-color: #00163b !important;
  bottom: 0.05rem;
  /* padding-bottom: .25rem; */
  /* lang="scss" */
}
::v-deep .el-tabs__active-bar {
  bottom: 0.2375rem;
}
::v-deep .el-tabs__item {
  color: #ffffff;
}
/* // 底部 */
.thecore54 {
  position: relative;
  width: 1920px;
  height: 122px;
  background: #00163b;
  border-radius: 0rem 0rem 0rem 0rem;
  opacity: 1;
}
.thecore55 {
  position: absolute;
  margin: 0.375rem 8.4rem 0.8875rem 8.4rem;
  width: 7.2rem;
  height: 0.2625rem;
  font-size: 0.2rem;
  font-weight: 400;
  color: #ffffff;
  line-height: 0.2625rem;
  letter-spacing: 0.025rem;
}
.thecore56 {
  position: absolute;
  margin: 0.8875rem 9.1563rem 0.375rem 9.1563rem;
  width: 6rem;
  height: 0.2625rem;
  font-size: 0.2rem;
  font-weight: 400;
  color: #ffffff !important;
  line-height: 0.2625rem;
  letter-spacing: 0.025rem;
}
.thecore56one {
  width: 2.75rem;
  height: 0.2625rem;
  color: #ffffff !important;
  font-size: 0.2rem;
  font-weight: 400;
}
</style>
